﻿using System;
using System.Data;

namespace Shopping.Entities
{
    /// -----------------------------------------------------------------------------
    ///<summary>
    /// The Info class for the ProductCommentsInfo
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// </history>
    /// -----------------------------------------------------------------------------
    public class ProductCommentsInfo
    {
        #region Private Members
		
        private int _id;
        private int _productId;
        private string _userName="";
        private bool _verified;
        private string _title="";
        private string _description="";
        private int _parentId;
        private DateTime _createDate;
        #endregion
        #region Constructors
        // initialization

        #endregion
        #region Public Properties
        /// <summary>
        /// Get and Set Property Data of File column Id in Table ProductComments 
        /// </summary>
				
        public int Id
        {
            get{ return _id; }
            set{ _id = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column ProductId in Table ProductComments 
        /// </summary>
				
        public int ProductId
        {
            get{ return _productId; }
            set{ _productId = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column UserName in Table ProductComments 
        /// </summary>
				
        public string UserName
        {
            get{ return _userName; }
            set{ _userName = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column Verified in Table ProductComments 
        /// </summary>
				
        public bool Verified
        {
            get{ return _verified; }
            set{ _verified = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column Title in Table ProductComments 
        /// </summary>
				
        public string Title
        {
            get{ return _title; }
            set{ _title = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column Description in Table ProductComments 
        /// </summary>
				
        public string Description
        {
            get{ return _description; }
            set{ _description = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column ParentId in Table ProductComments 
        /// </summary>
				
        public int ParentId
        {
            get{ return _parentId; }
            set{ _parentId = value; }
        }
				
        /// <summary>
        /// Get and Set Property Data of File column CreateDate in Table ProductComments 
        /// </summary>
				
        public DateTime CreateDate
        {
            get{ return _createDate; }
            set{ _createDate = value; }
        }
				
        #endregion		
		
        #region IHydratable Implementation

        /// <summary>
        /// 
        /// </summary>        
        public void Fill(IDataReader oReader)
        {
            _id=int.Parse(oReader["Id"].ToString());
            _productId=int.Parse(oReader["ProductId"].ToString());
            _userName=Convert.ToString(oReader["UserName"]);
            _verified=bool.Parse(oReader["Verified"].ToString());
            _title=Convert.ToString(oReader["Title"]);
            _description=Convert.ToString(oReader["Description"]);
            _parentId=int.Parse(oReader["ParentId"].ToString());
            _createDate=DateTime.Parse(oReader["CreateDate"].ToString());
        }
        #endregion
    }
}